home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(load){
- function update()
- {
- if(swooping)
- {
- if(count == 0)
- {
- if(50 < random(100))
- {
- direction = -1;
- }
- else
- {
- direction = 1;
- }
- limit = 10 + random(10);
- count = 1;
- }
- else
- {
- count++;
- if(limit < count)
- {
- count = 0;
- }
- }
- this._x += 5 * direction;
- this._y += 5;
- if(350 < this._y)
- {
- this._y = -30;
- swooping = false;
- _root.bonusship = false;
- count = 0;
- trace("bottom !" + _root.bonusship);
- }
- }
- else
- {
- this._x += -4;
- if(this._x < _root.swoop_point)
- {
- trace("swoop!");
- swooping = true;
- }
- if(this._x < 10)
- {
- _root.bonusship = false;
- swooping = false;
- count = 0;
- }
- }
- }
- status = "ok";
- swooping = false;
- count = 0;
- }
-